package mju.cxf.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.redisson.spring.session.config.EnableRedissonWebSession;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration

public class RedissonConfig {

    private final static String address = "redis://r-bp1no9k1oq4qf0wu1mpd.redis.rds.aliyuncs.com:6379";
    @Bean
    public RedissonClient redissonDemo() {
        final Config config = new Config();
        config.useSingleServer().setAddress(address).setPassword("Cxf12345");
        return Redisson.create(config);
    }

}
